package com.example.controller;

/**
 * @author ：songxusheng
 * @description：验证码接口
 * @date ：Created in 2022/5/17 9:35
 * @version:
 */
//@RestController
//@RequestMapping("/Code")
//public class VerifyCodeController {
//    @Autowired
//    Producer producer;
//
//    @GetMapping("/vc.jpg")
//    public void getVerifyCode(HttpServletResponse resp, HttpSession session) throws IOException {
//        resp.setContentType("image/jpeg");
//        String text = producer.createText();
//        session.setAttribute("verify_code", text);
//        BufferedImage image = producer.createImage(text);
//        try(ServletOutputStream out = resp.getOutputStream()) {
//            ImageIO.write(image, "jpg", out);
//        }
//    }
//}
